package main

import "fmt"

/**
如何一次性声明多个变量
*/
//声明全局变量一次性声明
var (
	n4    = 15.5
	n5    = 123
	name2 = "jack"
)

func main() {
	//一次性声明多个类型相同变量
	var n1, n2, n3 int
	fmt.Println("n1=", n1, "n2=", n2, "n3=", n3)
	//一次性声明多个不同类型的变量
	var n11, name, n33 = 100, "tom", 12
	fmt.Println("n11,", n11, "name=", name, "n33=", n33)
	n112, name1, n332 := 100, "tom", 12
	fmt.Println("n112,", n112, "name1=", name1, "n332=", n332)

}
